package crp.services.api.graphql.models;

import lombok.Getter;
import lombok.Setter;
import org.eclipse.microprofile.graphql.Input;

import javax.validation.constraints.NotNull;

@Input("CreateDepartmentInput")
@Getter
@Setter
public class CreateDepartmentInput {
    @NotNull
    private String code;
    @NotNull
    private String name;

    public static CreateDepartmentInput of(String code, String name) {
        CreateDepartmentInput input = new CreateDepartmentInput();
        input.setCode(code);
        input.setName(name);
        return input;
    }
}
